<template>
  <div class="page-wrap">
    <!-- 页面面包屑 -->
    <bread :curPath="{ toPath: '/honor', name: '企业荣誉' }" />
    <div class="page-main">
      <div class="con-box">
        <div class="main-menu-box">
          <h2><i class="yicon"></i>关于我们</h2>
          <ul class="main-menu shadow-box">
            <router-link to="/about" tag="li"><a>公司简介</a></router-link>
            <router-link to="/honor" tag="li"><a>企业荣誉</a></router-link>
          </ul>
        </div>
        <div class="main shadow-box">
            <h1><span>企业荣誉</span></h1>
            <div class="main-content">
                <p class="info" v-html="htmlContent">

                </p>
            </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  import Bread from './layout/Bread'
  import api from '@/api'
  import { htmlDecodeByRegExp } from '../assets/js/utils'

  export default {
    data() {
      return {
        pageInfo: {
          content: ''
        }
      }
    },
    mounted() {
      this.loadPageInfo()
    },
    computed: {
      htmlContent() {
        return htmlDecodeByRegExp(this.pageInfo.content)
      }
    },
    methods: {
      loadPageInfo() {
        api.honor().then(res => {
          if (res.data.errorCode === 0) {
            this.pageInfo = res.data.data
          }
        }).catch(err => {
          console.log(err)
        })
      }
    },
    components: {
      Bread
    }
  }
</script>

<style lang="scss" scoped>

</style>
